<?php
include("../db_connect.php");
include("../class/objName.php");
if(isset($_GET['category'])){
$pid = mysql_real_escape_string(htmlentities(trim($_GET['pid'])));
$obj = new objName();
	if($_GET['category'] == 'auto')
	{
	
		if($_GET['action'] == 'delete' ){
		
			$success = $obj->datadelete('tbltradein',"id",$pid);
			if($success){
				echo true;
			}
			else{
				echo false;
			}
		
		}
		else{
		
		}
	}
	else if($_GET['category'] == 'accesories'){
	
		if($_GET['action'] == 'delete' ){
		
			$success = $obj->datadelete('tblswaping',"",$pid);
			if($success){
				echo true;
			}
			else{
				echo false;
			}
		
		}
		else{
		
		}
	
	}
}










?>